Image processing method, image processing apparatus, and storage medium

ABSTRACT

To precisely approximate the nonlinear output characteristic of an output device and enable high-precise color reproduction, a method is provided to convert a device-independent color space into an output device-dependent color space, comprising the steps of: inputting a colorimetry value of a color patch output by the output device and represented in the device-independent color space; extracting a colorimetry value close to a conversion target value represented in the device-independent color space, from the input colorimetry value; and performing, according to a distance between the input and extracted colorimetry values in the device-independent color space, a weighting process for a color value corresponding to the extracted colorimetry value and represented in the output device-dependent color space to obtain a color value corresponding to the input colorimetry value and represented in the output device-dependent color space.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to a method and an apparatus forperforming a conversion process on the basis of a colorimetry result ofa color patch output by an output device.

[0003] 2. Related Background Art

[0004] Conventionally, a color masking method of obtaining an outputcolor space by performing a matrix calculation on an input color space,and a method of obtaining an output color space from an input colorspace using a lookup table (LUT) have been widely used as methods ofcorrecting color to improve a color reproduction effect in a colorreproduction process on a printer.

[0005] However, since the output characteristic of a color printerincludes strong nonlinearity, a global method such as the color maskingmethod, that is, a method in which the entire output color space isaffected by a change of a matrix value, has difficulty in adequatelyapproximating the characteristic of a color printer in all color ranges.Also in the method using the LUT, table values are often determinedaccording to the masking method, so that the same difficulty in colorreproducibility is found.

SUMMARY OF THE INVENTION

[0006] An object of the present invention is to precisely approximatethe nonlinear output characteristic of an output device and thus enablecolor reproduction with high precision.

[0007] In order to achieve the above object, the present invention ischaracterized as follows.

[0008] That is, according to the invention, there is provided an imageprocessing method for converting a device-independent color space into acolor space dependent on an output device, comprising the steps of:

[0009] inputting a colorimetry value of a color patch output by theoutput device and represented in the device-independent color space;

[0010] extracting a colorimetry value close to a conversion target valuerepresented in the device-independent color space, from the inputcolorimetry value; and

[0011] performing, according to a distance between the input colorimetryvalue and the extracted colorimetry value in the device-independentcolor space, a weighting process for a color value corresponding to theextracted colorimetry value and represented in the color space dependenton the output device so as to obtain a color value corresponding to theinput colorimetry value and represented in the color space dependent onthe output device.

[0012] Further, according to the invention, there is provided an imageprocessing method for mapping input data outside a color reproductionrange of an output device onto the color reproduction range of theoutput device, based on a colorimetry result of a color patch output bythe output device, comprising:

[0013] extracting from the input data the plural colorimetry resultsclose to a position where a vertical line is down onto the colorreproduction range of the output device, based on the colorimetry resultof the color patch positioned on the outside edge of the colorreproduction range; and

[0014] obtaining a mapping result for the input data from the pluralextracted colorimetry results.

[0015] The above and other objects, features and advantages of theinvention will become more apparent by reference to the followingdetailed description of the invention taken in conjunction with theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0016]FIG. 1 is a diagram showing the configuration of the firstembodiment of the present invention;

[0017]FIG. 2 is a diagram showing an example of an input color→Lab LUT102;

[0018]FIG. 3 is a diagram showing an example of a color patch 109;

[0019]FIG. 4 is a diagram showing colorimetry values obtained in acolorimetry process by a color patch colorimetry unit 110;

[0020]FIG. 5 is a diagram showing the process of selecting Lab values(Lab→DeviceRGB conversion unit 106);

[0021]FIG. 6 is a diagram showing a weight function depending on adistance;

[0022]FIG. 7 is a diagram showing a sample point function;

[0023]FIG. 8 is a diagram showing the configuration according to thesecond embodiment of the present invention; and

[0024]FIG. 9 is a diagram showing the configuration according to thethird embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0025] {First Embodiment}

[0026] The first embodiment of the present invention will be describedbelow by referring to the attached drawings.

[0027]FIG. 1 shows the contents of the process according to the presentembodiment. An input signal is a color space signal dependent on adevice, and can be, for example, an RGB signal read by a scanner A, aCMYK signal to be output to a printer B. When the present embodiment isapplied to a copying machine, the signal can be the RGB signal read bythe scanner. When a proof is checked, the signal can be the CMYK signalto be output to the target printer.

[0028] The above input signals are input to an input color Labconversion unit 101, and converted into signals in a Lab space which isa color space independent of a device. According to the presentembodiment, the conversion is realized by an LUT conversion using theinput color Lab LUT 102. At this time, a table used in the conversion isto be set appropriate in an input color space. For example, when an RGBcolor space dependent on the scanner A is an input side, athree-dimensional input/three-dimensional output RGB→Lab conversiontable corresponding to an RGB signal value and a Lab value dependent onthe scanner A is set as an LUT. Similarly, when a CMYK color spacedependent on the printer B is an input side, a four-dimensionalinput/three-dimensional output CMYK→Lab conversion table correspondingto a CMYK signal value and a Lab value dependent on the printer B is setas an LUT. FIG. 2 shows an example of an LUT. The example shown in FIG.2 shows the correspondence between an RGB value having 8 bits for eachof the R, G, and B and a Lab value, and only the Lab value is stored asan actual LUT.

[0029] In the input color→Lab conversion unit 101, the address on thetable is computed from the input signal to retrieve the Lab value fromthe LUT, interpolation calculation is performed using the retrieved Labvalue, and a Lab value corresponding to the input signal is obtained.

[0030] The Lab signal obtained by the input color→Lab conversion unit101 is then input to a Lab→DeviceRGB conversion unit 104, and isconverted into a signal in a DeviceRGB space which is a space dependenton a printer 107 by using DeviceRGB→Lab LUT 105.

[0031] When an input color space is an RGB space, the color range islarger than the color reproduction range of the printer in most cases.Therefore, a color space compression conversion unit (or a color gamutmapping unit) 103 first performs a mapping process in the colorreproduction range, and then inputs a Lab signal into the Lab→DeviceRGBconversion unit 104.

[0032] A signal converted by the Lab→DeviceRGB conversion unit 104 forthe DeviceRGB space is also converted by the Lab→DeviceRGB conversionunit 106 for a CMYK color space dependent on the printer 107, and isthen transferred to the printer 107. Various well-known methods can beused for the RGB→CMYK conversion, and thus any of the methods can bearbitrarily used.

[0033] According to the present embodiment, the following equations areused for conversion.

K=min(1.0−R, 1.0−G, 1.0−B)

C=(1.0−R)−K

M=(1.0−G)−K

Y=(1.0−B)−K

[0034] (Lab→DeviceRGB Conversion Process)

[0035] Described below in detail are the Lab DeviceRGB conversion unit104 and the DeviceRGB Lab LUT 105.

[0036] In the Lab→DeviceRGB conversion unit 104, a conversion process isperformed based on the correspondence between the DeviceRGB signal valuestored in a color patch generation unit 108 and the Lab colorimetryvalue obtained by the color patch colorimetry unit 110.

[0037] (Generation of DeviceRGB→Lab LUT 105)

[0038] First, the color patch generation unit 108 generates a colorpatch signal indicating a color patch image as shown in FIG. 3. Thecolor patch signal is transferred to the printer 107 through a processpath only passing the Lab→DeviceRGB conversion unit 106, and the printer107 generates a color patch image 109.

[0039] The color patch signal is generated such that the DeviceRGB spacecan be equally divided. In FIG. 3, an RGB space having 8 bits each forR, G, and B is equally divided into 9×9×9 unit, and 729 patches areobtained. In this example, the color space dependent on the printer 107is a CMYK color space. However, since it is considered that an RGB spacecan be converted into a CMYK color space according to the conversionrule from the RGB space, the RGB space is considered to be a color spacedependent on the printer 107.

[0040] Second, the color patch colorimetry unit 110 performs acolorimetry process on the obtained color patch image 109, and a Labcolorimetry value is obtained for each patch. FIG. 4 shows an example ofthe obtained Lab colorimetry value.

[0041] In the operation, the RGB value generated by the color patchgeneration unit 108 and the Lab colorimetry value obtained by the colorpatch colorimetry unit 110 can be obtained. Therefore, a DeviceRGB→LabLUT for storing the correspondence between the DeviceRGB and the Labcolorimetry value on the points on which the DeviceRGB space is equallydivided can be obtained.

[0042] (Lab→DeviceRGB Conversion)

[0043] A Lab→deviceRGB conversion is performed using the generatedDeviceRGB→Lab LUT, but a problem occurs in the conversion. That is, whenan LUT computation is performed, conventional interpolation calculationsuch as the interpolation on a cube, the interpolation on a tetrahedron,etc. is performed. However, the above interpolation calculation can onlybe performed on a table value when the table input side has a uniformgrid. Nevertheless, the DeviceRGB→Lab LUT obtained in the above processdoes not have a uniform table value for an input Lab value. Therefore,the interpolation calculation cannot be normally performed using a Labvalue as an input value.

[0044] Therefore, according to the present embodiment, a Lab→deviceRGBconversion is performed in the following procedure.

[0045] First, the distance (equal to the color difference obtained by aLab color difference equation) between the Lab value in theDeviceRGB→Lab LUT and the input Lab signal is computed and stored. Theobtained distance is expressed by d.

[0046] Second, N entries are selected from the DeviceRGB→Lab LUT inorder from the shortest distance d for the input Lab value.

[0047] At this time, the Lab values are expressed as follows in orderfrom the shortest distance.

[0048] DeviceRGB1→Lab1 d1

[0049] DeviceRGB2→Lab2 d2

[0050] DeviceRGB3→Lab3 d3

[0051]FIG. 5 shows the process of selecting Lab1, Lab2, . . . .

[0052] Third, the DeviceRGB value for an input Lab value is computed asfollows.

RGB=ΣRGBi×f(di)

i=N

f(x)=1/(1+x^ 4)

[0053] In this case, f(x) is a function having the curve as shown inFIG. 6. That is, the interpolation calculation is performed with alarger weight assigned to an RGB value having a shorter distance in theLab space.

[0054] The number N of the table values in the interpolation calculationcan be constant (e.g., 8) in the Lab space.

[0055] However, in the method of the DeviceRGB→CMYK conversion unit, asshown in FIG. 4, the colorimetry values concentrate on a low brightnessL* area. Therefore, a problem can occur when N is a constant. In thisarea, when N is too small, the distance between the input Lab value andthe Lab value of the sample point is too short. Accordingly, theinterpolation calculation is performed on a small number of samplepoints using a large weight. As a result, the problems such as agradation jump in the DeviceRGB space, a bad white balance in a lowbrightness range, etc. occur.

[0056] Therefore, when the interpolation calculation is performed bychanging the number of samples depending on the value of the L of theinput Lab value as shown in FIG. 7, the effect of solving the aboveproblems can work. Furthermore, in a high brightness range, the numberof samples in the interpolation calculation can be limited, therebysuppressing unclear color. In the function N(L) shown in FIG. 7, the ¼exponent function is shown as an example with the value of 128 assignedto L=0, and the value of 4 assigned to L=100.

[0057] (Color Space Compression)

[0058] Described below is the color space compression method used by thecolor space compression conversion unit 103. There are various methodsof color space compression. For example, a color space compressionprocess is performed in a uniform color space as disclosed by JapanesePatent Application Laid-Open No. 8-130655.

[0059] Another example is a method of setting a color space compressionconversion condition using a Lab colorimetry value obtained by the colorpatch colorimetry unit 110.

[0060] In this color space compression method, a predetermined number(e.g., 8) of Lab values are selected from the DeviceRGB→Lab LUT suchthat the distance d between the input color outside the colorreproduction range and the Lab value of the point of the vertical linedown onto the color reproduction range from the input color is short,and that the Lab value is positioned on the outside edge of the colorreproduction range. The data of the position of the outside edge of thecolor reproduction range is the data of the position on the 6 planes ofa cube forming a DeviceRGB space. That is, the data of the position ofthe outside edge of the color reproduction range can be detected inadvance based on the RGB value generated by the color patch generationunit 108.

[0061] As in the above method of obtaining the DeviceRGB for the inputLab value, the interpolating process is performed using a predeterminednumber of Lab values weighted by the distance d, and a conversion Labvalue in the color reproduction range corresponding to the input coloroutside the color reproduction range is obtained.

[0062] In this color space compression method, an input color outsidethe color reproduction range can be converted into a color near theoutside edge of the color reproduction range having a Lab value of acolor close to an input color. That is, a color outside the colorreproduction range can be successfully converted into a clear color.

[0063] {Second Embodiment}

[0064]FIG. 8 shows the configuration of the second embodiment, that is,a modification of the first embodiment, of the present invention.According to the present embodiment, unlike the first embodiment, theconversion from a device independent color space to a printer-dependentcolor space is performed in the LUT process as in the conversion from aninput color to a device independent color space.

[0065] After an input color→Lab conversion unit 801 and an inputcolor→Lab LUT 802 perform the same processes as the input color→Labconversion unit 101 and the input color→Lab LUT 102 according to thefirst embodiment, a Lab→CMYK conversion unit 803 performs an LUTconversion using a Lab→CMYK LUT 804. The CMYK signal processed in theLab→CMYK conversion is transmitted to a printer 805 and output. TheLab→CMYK LUT 804 is created as follows. A DeviceRGB color patch image isconverted into a DeviceCMYK by a DeviceRGB→CMYK conversion unit 807, andis output on the printer 807. An output color patch 808 is processed bya color patch colorimetry unit 809, and an LUT is created by a Lab→CMYKLUT creation unit 810 based on the obtained colorimetry value and theRGB value generated by the color patch generation unit 806.

[0066] The process of the Lab→CMYK LUT creation unit 810 can beperformed by performing the color space compression process according tothe first embodiment, the Lab→DeviceRGB conversion process, and theDeviceRGB→CMYK conversion on the grid value of the Lab input into theLUT.

[0067] For example, if the Lab value is processed as an eight-bitsignal, then the grid of the Lab is configured with the value of Lranging from 0 to 255, and with the value of a, b ranging from −128 to127 in 16 units. When the above processes are performed on each gridvalue, a Lab→CMYK LUT can be created.

[0068] With the above configuration, the conversion performed in thefirst embodiment from the Lab color space to the CMYK color space can beperformed using the LUT, thereby efficiently performing the computation.

[0069] {Third Embodiment}

[0070] According to the present embodiment, the configuration used inthe case in which an sRGB color space which has become a standard colorspace on the Internet is used as an input color space is described. Thecorrespondence between the sRGB color space and the XYZ color space isdefined, and the sRGB color space can be considered a device independentcolor space. Therefore, if the sRGB color value is converted into an XYZvalue and a Lab value, and the conversion is performed from the Labvalue to the printer color space as described above, the signal in thesRGB color space can be reproduced on a printer.

[0071]FIG. 9 shows the configuration according to the presentembodiment. The input sRGB signal is converted into a CMYK value in theLUT conversion process using an sRGB→CMYK LUT 902 by an sRGB→CMYKconversion unit 901, transmitted to a printer 903, and output. ThesRGB→CMYK LUT 902 is created by a sRGB→CMYK generation unit 908 based onthe colorimetry value obtained by performing the colorimetry process ona color patch 906 by a color patch colorimetry unit 907 and the RGBvalue generated by a color patch generation unit 904.

[0072] An sRGB→CMYK LUT is created as follows. Assume that an input sRGBsignal is processed as an eight-bit signal, and sRGB grids areconfigured as 17×17×17 grids. After performing operations of convertingsRGB→XYZ and XYZ→Lab by a definition equation, the above Lab→DeviceRGBconversion process and DeviceRGB→CMYK conversion process are performedon each grid value, thereby obtaining an sRGB→CMYK LUT.

[0073] {Modification}

[0074] In the above embodiments, a Lab is used as a color spaceindependent of a device, but other spaces such as XYZ, Luv, etc. canalso be used.

[0075] Furthermore, a printer is used as an output device, but otheroutput devices such as a printing device, etc. can also be used.Similarly, a color signal to be transferred to a printer unit is notlimited to the YMCK, but other color signals can be used.

[0076] In the above embodiments, the number of patches is 729, but othernumbers can also be used.

[0077] While the number N of the table values for use in theinterpolation calculation is set based on the brightness L as shown inFIG. 4, it may be set three-dimensionally in consideration of a and baddition to the brightness L.

[0078] Additionally, the present invention also includes the abovedevices operated by a program stored in the computer (CPU or MPU) of asystem or a device connected to the devices to realize the function ofthe above embodiments and to operate the devices by providing a programcode of the software for realizing the function of the aboveembodiments.

[0079] In this case, the functions of the above embodiments are realizedby the program code of the software. The program code and a unit forproviding the program code for the computer, for example, a storagemedium storing the program code configure the present invention.

[0080] As a storage medium storing the program code can be a floppydisk, a hard disk, an optical disk, a magneto-optical disk, CD-ROM, amagnetic tape, a nonvolatile memory card, ROM, etc.

[0081] Furthermore, the present invention obviously includes the programcode not only in the realization of the functions of the aboveembodiment by executing the program code provided for the computer, butalso in the realization of the functions of the above embodiments incooperation with the OS (operating system) operated in the computer, orother application software, etc.

[0082] Additionally, the present invention obviously includes theprogram code in the realization of the functions of the aboveembodiments when the program code is stored in the memory of a computerfunction extension board or a function extension unit connected to thecomputer, and the CPU, etc. in the function extension board or thefunction extension unit performs a part or all of the actual processaccording to an instruction of the program code.

[0083] As many apparently widely different embodiments of the presentinvention can be made without departing from the spirit and scopethereof, it is to be understood that the present invention is notlimited to the specific embodiments thereof expect as defined in theappended claims.

What is claimed is:
 1. An image processing method for converting adevice-independent color space into a color space dependent on an outputdevice, comprising the steps of: inputting a colorimetry value of acolor patch output by the output device and represented in thedevice-independent color space; extracting a colorimetry value close toa conversion target value represented in the device-independent colorspace, from the input colorimetry value; and performing, according to adistance between the input colorimetry value and the extractedcolorimetry value in the device-independent color space, a weightingprocess for a color value corresponding to the extracted colorimetryvalue and represented in the color space dependent on the output deviceso as to obtain a color value corresponding to the input colorimetryvalue and represented in the color space dependent on the output device.2. A method according to claim 1, wherein the number of the colorimetryvalues to be extracted is changed according to the input colorimetryvalue.
 3. A method according to claim 2, wherein the number of thecolorimetry values to be extracted is changed according to brightness ofthe input colorimetry value.
 4. A method according to claim 2, whereinthe number of the colorimetry values to be extracted in high brightnessis set to be smaller than the number of the colorimetry values to beextracted in low brightness.
 5. A method according to claim 1, whereinthe image process is performed to a grid of a lookup table forconverting the device-independent color space into the color spacedependent on the output device, thereby creating the lookup table, and aconversion process is performed to input image data by using the createdlookup table.
 6. A method according to claim 1, wherein a weightfunction used in the weighting process is given as f(d)=1/(1+d^ 4). 7.An image processing method for mapping input data outside a colorreproduction range of an output device onto the color reproduction rangeof the output device, based on a colorimetry result of a color patchoutput by the output device, comprising: extracting from the input datathe plural colorimetry results close to a position where a vertical lineis down onto the color reproduction range of the output device, based onthe colorimetry result of the color patch positioned on the outside edgeof the color reproduction range; and obtaining a mapping result for theinput data from the plural extracted colorimetry results.
 8. An imageprocessing apparatus for converting a device-independent color spaceinto a color space dependent on an output device, comprising: an inputunit for inputting a colorimetry value of a color patch output by saidoutput device and represented in the device-independent color space; anextraction unit for extracting a colorimetry value close to a conversiontarget value represented in the device-independent color space, from theinput colorimetry value; and means for performing, according to adistance between the input colorimetry value and the extractedcolorimetry value in the device-independent color space, a weightingprocess for a color value corresponding to the extracted colorimetryvalue and represented in the color space dependent on said output deviceso as to obtain a color value corresponding to the input colorimetryvalue and represented in the color space dependent on said outputdevice.
 9. A recording medium which records a program to achieve animage processing method for converting a device-independent color spaceinto a color space dependent on an output device, said programcomprising: an input module for inputting a colorimetry value of a colorpatch output by the output device and represented in thedevice-independent color space; an extraction module for extracting acolorimetry value close to a conversion target value represented in thedevice-independent color space, from the input colorimetry value; and aprocessing module for performing, according to a distance between theinput colorimetry value and the extracted colorimetry value in thedevice-independent color space, a weighting process for a color valuecorresponding to the extracted colorimetry value and represented in thecolor space dependent on the output device so as to obtain a color valuecorresponding to the input colorimetry value and represented in thecolor space dependent on the output device.
 10. A recording medium whichrecords a program to achieve an image processing method for mappinginput data outside a color reproduction range of an output device ontothe color reproduction range of the output device, based on acolorimetry result of a color patch output by the output device, saidprogram comprising: an extraction module for extracting from the inputdata the plural colorimetry results close to a position where a verticalline is down onto the color reproduction range of the output device,based on the colorimetry result of the color patch positioned on theoutside edge of the color reproduction range; and an obtaining modulefor obtaining a mapping result for the input data from the pluralextracted colorimetry results.